package com.gap.employeestatus;

import com.buanalintas.framework.Dictionary;
import com.gap.entities.GapMasterEmployeeStatus;
import com.buanalintas.framework.Field;
import com.buanalintas.framework.Page;

/**
 *
 * Class EmployeeStatus is ...
 *
 * Generated on Wed Jan 07 10:52:06 ICT 2015
 *
 * @version 1.0
 * @author  Mr. Kazao™
 * @since   Bynga 1.0
 *
 */
public class EmployeeStatus extends Page {

    
    private Field employeeStatusId;
    
    private Field employeeStatusName;
    
    private Field employeeStatusDescription;
    

    public EmployeeStatus() {
        super();

        setTheClass(GapMasterEmployeeStatus.class);
        
        
        
        
        employeeStatusId = new Field();
        employeeStatusId.setName("employeeStatusId");
        employeeStatusId.setCaption("status");
        //employeeStatusId.setInfo("employee status id");
        employeeStatusId.setListProperties(" align=\"left\" width=\"1%\" nowrap");
        employeeStatusId.setInputProperties(" size=\"20\"");        
        getFields().add(employeeStatusId);
        
        employeeStatusName = new Field();
        employeeStatusName.setName("employeeStatusName");
        employeeStatusName.setCaption("name");
        employeeStatusName.setRequired(true);
        employeeStatusName.setListProperties(" align=\"left\" width=\"40%\" nowrap");
        employeeStatusName.setInputProperties(" size=\"20\"");        
        getFields().add(employeeStatusName);
        
        employeeStatusDescription = new Field();
        employeeStatusDescription.setName("employeeStatusDescription");
        employeeStatusDescription.setCaption("description");
        //employeeStatusDescription.setInfo("employee status description");
        employeeStatusDescription.setListProperties(" align=\"left\" width=\"60%\" nowrap");
        employeeStatusDescription.setInputProperties(" size=\"20\"");        
        getFields().add(employeeStatusDescription);
        

        fillFields();
        getFieldsAdd().remove(employeeStatusId);
        getFieldsEdit().remove(employeeStatusId);
        getFieldsList().remove(employeeStatusId);
        
        setExportList(getClass().getResourceAsStream("EmployeeStatusList.jasper"));
        setExport(getClass().getResourceAsStream("EmployeeStatus.jasper"));
    }
    
    @Override
    public void beforeExport() {
        getExportParams().put("title", Dictionary.getValue(this, "Employee Status"));
    }

    @Override
    public void beforeExportMulti() {
        beforeExport();
    }
}
